package com.xiaodou.mjf.application.basic.service.impl;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Service;

import com.xiaodou.mjf.application.basic.repository.SmsRepository;
import com.xiaodou.mjf.application.basic.service.SmsService;
import com.xiaodou.mjf.entity.basic.Sms;
import com.xiaodou.mjf.infrastructure.common.app.JpaSimpleService;


/***
 *
 * Sms业务访问实现
 * @author XiaoDou.com Code Generator
 * @version 1.0
 * 2014-10-29 17:37:52
 *
 */
@Service @Transactional
public class SmsServiceImpl extends JpaSimpleService<Sms,String> implements SmsService{

	Logger logger = LoggerFactory.getLogger(SmsServiceImpl.class);

    @Resource
    SmsRepository smsRepository;

    @Override
    protected JpaRepository<Sms, String> getRepository() {
        return smsRepository;
    }


    public Sms findByPhone(String phone,int type) {
    	
    	Sms sms= smsRepository.find( phone, type);
    	return sms;

    }

}

